reftests: Add a test ensuring selectors don't match children
authorBenjamin Otte <otte@redhat.com>
Sun, 15 May 2011 11:27:19 +0000 (13:27 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 18 May 2011 20:17:57 +0000 (22:17 +0200)
Previously, the selector "Foo" would not only match Foo widgets, but
also all widgets that are descendants of Foo.

tests/reftests/Makefile.am
tests/reftests/css-match-exact.css [new file with mode: 0644]
tests/reftests/css-match-exact.ref.ui [new file with mode: 0644]
tests/reftests/css-match-exact.ui [new file with mode: 0644]

index 216888507ccd3445ff1e898e2ff92d0310b6b360..44d400ee559a66ea43aa51799e74801c09a126a8 100644 (file)
@@ -35,6 +35,9 @@ EXTRA_DIST += \
        css-match-descendant-later.css \
        css-match-descendant-later.ref.ui \
        css-match-descendant-later.ui \
+       css-match-exact.css \
+       css-match-exact.ref.ui \
+       css-match-exact.ui \
        css-match-name.css \
        css-match-name.ref.ui \
        css-match-name.ui \
diff --git a/tests/reftests/css-match-exact.css b/tests/reftests/css-match-exact.css
new file mode 100644 (file)
index 0000000..c84ffe9
--- /dev/null
@@ -0,0 +1,3 @@
+GtkGrid {
+  background-color: purple;
+}
diff --git a/tests/reftests/css-match-exact.ref.ui b/tests/reftests/css-match-exact.ref.ui
new file mode 100644 (file)
index 0000000..2f24fa1
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="width_request">10</property>
+    <property name="height_request">10</property>
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/css-match-exact.ui b/tests/reftests/css-match-exact.ui
new file mode 100644 (file)
index 0000000..1c39ba7
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="width_request">10</property>
+    <property name="height_request">10</property>
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkEventBox" id="eventbox1">
+            <property name="width_request">10</property>
+            <property name="height_request">10</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>